$body = @{
    vectors = @{
        size = 384
        distance = "Cosine"
    }
    optimizers_config = @{
        default_segment_number = 2
    }
    replication_factor = 1
} | ConvertTo-Json -Depth 10

try {
    $response = Invoke-RestMethod -Uri "http://localhost:6333/collections/wms_knowledge" -Method Put -Body $body -ContentType "application/json"
    Write-Host "Collection created successfully" -ForegroundColor Green
    $response
}
catch {
    Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
}
